using System;
using System.Collections.Generic;
using System.Text;

namespace C4F.DevKit.RSS.ScreenSaverWPF
{
    // Provides easy and central access to user configuration settings.
    sealed class SettingsWrapper
    {
        static Properties.Settings _settings;

        // Load settings.
        static SettingsWrapper()
        { 
            _settings = new Properties.Settings(); 
        }

        // Prevent direct instantiation.
        private SettingsWrapper()
        { }

        public static int FadePauseInterval
        {
            get
            { 
                return _settings.FadePauseInterval; 
            }
            set
            {
                if (value <= 0)
                { 
                    throw new ArgumentException(ResourcesWrapper.ValueGreaterThanZeroText); 
                }
                _settings.FadePauseInterval = value;
                _settings.Save();
            }
        }
    }
}
